﻿<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2009 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
-->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/dialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/overlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/zotero.css"?>
<?xml-stylesheet href="chrome://zotero/skin/integration.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">

<window
	id="add-citation-dialog"
	class="contain-richlistbox"
	windowtype="zotero:item-selector"
	orient="vertical"
	title="&zotero.integration.addEditCitation.title;"
	onload="Zotero_Citation_Dialog.load();"
	onunload="doUnload();"
	onclose="Zotero_Citation_Dialog.cancel();"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	xmlns:html="http://www.w3.org/1999/xhtml"
	persist="screenX screenY width height">
<dialog
	id="zotero-add-citation-dialog"
	buttons="extra1,extra2,accept,cancel">
	
	<script>
		var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

		Services.scriptloader.loadSubScript("chrome://zotero/content/include.js", this);

		// Custom elements
		Services.scriptloader.loadSubScript("chrome://zotero/content/customElements.js", this);

		Services.scriptloader.loadSubScript("chrome://zotero/content/selectItemsDialog.js", this);
		Services.scriptloader.loadSubScript("chrome://zotero/content/integration/addCitationDialog.js", this);
	</script>


	<vbox id="zotero-select-items-container" flex="1">
		<hbox flex="1">
			<vbox align="stretch" flex="1" style="min-width: 500px">
				<hbox align="center" pack="end">
					<quick-search-textbox id="zotero-tb-search" timeout="250" oncommand="onSearch()" dir="reverse"/>
				</hbox>
				<hbox flex="1" style="margin-top: 5px">
					<vbox id="zotero-collections-tree-container" class="virtualized-table-container" style="min-width: 200px; min-height: 100%;">
						<html:div id="zotero-collections-tree"></html:div>
					</vbox>

					<hbox id="zotero-items-pane-content" class="virtualized-table-container" flex="1" style="width: 100%; min-height: 100%;">
						<html:div id="zotero-items-tree"></html:div>
					</hbox>
				</hbox>
			</vbox>
					
			<hbox hidden="true" id="multiple-sources" align="stretch">
				<vbox align="center" pack="center" id="citation-buttons">
					<toolbarbutton id="up" oncommand="Zotero_Citation_Dialog.up()" disabled="true"/>
					<toolbarbutton id="add" oncommand="Zotero_Citation_Dialog.add()" disabled="true"/>
					<toolbarbutton id="remove" oncommand="Zotero_Citation_Dialog.remove()" disabled="true"/>
					<toolbarbutton id="down" oncommand="Zotero_Citation_Dialog.down()" disabled="true"/>
				</vbox>
				<vbox align="left">
					<checkbox id="keepSorted" hidden="true" checked="false" oncommand="Zotero_Citation_Dialog.citationSortUnsort()" label="&zotero.citation.keepSorted.label;" native="true"/>
					<richlistbox id="item-list" flex="1" align="stretch" seltype="single" style="width: 250px;"
						onselect="Zotero_Citation_Dialog.listItemSelected();"/>
				</vbox>
			</hbox>
		</hbox>
		
		<hbox align="stretch" style="margin-top: 8px">
			<vbox flex="1">
				<hbox align="center">
					<label value="&zotero.citation.prefix.label;" control="prefix"/>
					<html:input type="text" class="fix" id="prefix" tabindex="0"
								oninput="Zotero_Citation_Dialog.confirmRegenerate(false)"
								onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/>
				</hbox>
				<hbox align="center">
					<label value="&zotero.citation.suffix.label;" control="suffix"/>
					<html:input type="text" class="fix" id="suffix" tabindex="0"
								oninput="Zotero_Citation_Dialog.confirmRegenerate(false)"
								onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/>
				</hbox>
				<spacer flex="1"/>
			</vbox>
			<separator flex="4"/>
			<vbox flex="1">
				<hbox align="stretch">
					<menulist onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="label" tabindex="0" native="true" data-l10n-id="quickformat-locator-type">
						<menupopup id="locator-type-popup"/>
					</menulist>
					<label id="locator-input-label" data-l10n-id="quickformat-locator-value" hidden="true"></label>
					<html:input aria-labelledby="label locator-input-label" oninput="Zotero_Citation_Dialog.confirmRegenerate(false)"  onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" tabindex="0"/>
				</hbox>
				<separator style="height: 2px" flex="1"/>
				<checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppress-author" label="&zotero.citation.suppressAuthor.label;" tabindex="0" native="true"/>
			</vbox>
		</hbox>

		<iframe id="editor" src="simpleEditor.html" hidden="true" flex="1" type="content" remote="false" maychangeremoteness="false"/>
		<description id="zotero-editor-warning" style="margin: 9px 1px 0" hidden="true">&zotero.citation.editorWarning.label;</description>
	</vbox>
</dialog>
</window>
